package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TestStudentMapper;
import com.ruoyi.system.domain.TestStudent;
import com.ruoyi.system.service.ITestStudentService;

/**
 * 学生测试Service业务层处理
 * 
 * @author budiu
 * @date 2024-09-11
 */
@Service
public class TestStudentServiceImpl implements ITestStudentService 
{
    @Autowired
    private TestStudentMapper testStudentMapper;

    /**
     * 查询学生测试
     * 
     * @param id 学生测试主键
     * @return 学生测试
     */
    @Override
    public TestStudent selectTestStudentById(Long id)
    {
        return testStudentMapper.selectTestStudentById(id);
    }

    /**
     * 查询学生测试列表
     * 
     * @param testStudent 学生测试
     * @return 学生测试
     */
    @Override
    public List<TestStudent> selectTestStudentList(TestStudent testStudent)
    {
        return testStudentMapper.selectTestStudentList(testStudent);
    }

    /**
     * 新增学生测试
     * 
     * @param testStudent 学生测试
     * @return 结果
     */
    @Override
    public int insertTestStudent(TestStudent testStudent)
    {
        testStudent.setCreateTime(DateUtils.getNowDate());
        return testStudentMapper.insertTestStudent(testStudent);
    }

    /**
     * 修改学生测试
     * 
     * @param testStudent 学生测试
     * @return 结果
     */
    @Override
    public int updateTestStudent(TestStudent testStudent)
    {
        testStudent.setUpdateTime(DateUtils.getNowDate());
        return testStudentMapper.updateTestStudent(testStudent);
    }

    /**
     * 批量删除学生测试
     * 
     * @param ids 需要删除的学生测试主键
     * @return 结果
     */
    @Override
    public int deleteTestStudentByIds(Long[] ids)
    {
        return testStudentMapper.deleteTestStudentByIds(ids);
    }

    /**
     * 删除学生测试信息
     * 
     * @param id 学生测试主键
     * @return 结果
     */
    @Override
    public int deleteTestStudentById(Long id)
    {
        return testStudentMapper.deleteTestStudentById(id);
    }
}
